<?php
/**
 * Date: 2024.8
 * Author: kahn
 * 响应消息配置
 */
namespace config;

class Response {
    CONST SUCCESS = 1000;
    CONST JWT_EXPIRE = 1001;
    CONST WXMICRO_UNBIND = 1002;

    CONST SYSTEM_ERROR = 2001;
    CONST SIGN_ERROR = 2002;
    CONST PARAMS_ERROR = 2003;
    CONST PARAMS_LACK = 2004;
    CONST JWT_ERROR = 2005;
    CONST MOBILE_FORMAT_ERROR = 2006;
    CONST NATIVE_AUTH_FAIL = 2007;
    CONST WXMICRO_MOBILE_FAIL = 2008;
    CONST WXMICRO_UNIONID_FAIL = 2009;
    CONST SMS_FAIL = 2011;
    CONST SMS_CODE_ERROR = 2012;
    CONST CAPTCHA_ERROR = 2013;
    CONST MOBILE_LOGIN_FREQUENT = 2014;
    CONST MOBILE_LOGIN_LIMIT = 2015;
    CONST USER_FREEZED = 2016;

    CONST ORDER_STATUS_PAYING = 2017;

    CONST ORDER_NO_OPENID = 2018;

    CONST PUBLIC_OPENID_FAIL = 2019;
    CONST MICRO_OPENID_FAIL = 2020;
    CONST VIP_NEED = 2021;
    CONST UNCATCH_EXCEPTION = 2022;
    CONST USER_LOGOFF  = 2023;
    CONST LESS_THAN_MIN_PRICE  = 2024;

    CONST CODE_MSG = [
        self::SUCCESS => '成功',
        self::SYSTEM_ERROR => '系统错误',
        self::SIGN_ERROR => '签名校验失败',
        self::PARAMS_ERROR => '参数错误',
        self::PARAMS_LACK => '参数缺失',
        self::JWT_ERROR => 'JWT认证失败',
        self::JWT_EXPIRE => 'JWT过期',
        self::MOBILE_FORMAT_ERROR => '手机号码格式不正确',
        self::NATIVE_AUTH_FAIL => '本机号码登录失败',
        self::WXMICRO_MOBILE_FAIL => '小程序获取手机号码失败',
        self::WXMICRO_UNIONID_FAIL => '小程序获取unionid失败',
        self::WXMICRO_UNBIND => '小程序未绑定手机号',
        self::SMS_FAIL => '发送验证码失败',
        self::SMS_CODE_ERROR => '短信验证码不正确',
        self::CAPTCHA_ERROR => '图片验证码错误',
        self::MOBILE_LOGIN_FREQUENT => '验证码发送过去频繁',
        self::MOBILE_LOGIN_LIMIT => '验证码发送达到上限',
        self::USER_FREEZED => '用户被禁止登录',
        self::ORDER_STATUS_PAYING => '订单支付中',
        self::ORDER_NO_OPENID => '无OPNEID记录',
        self::PUBLIC_OPENID_FAIL => '获取OPENID失败',
        self::MICRO_OPENID_FAIL => '获取OPENID失败',
        self::VIP_NEED => '需要vip权限',
        self::UNCATCH_EXCEPTION => '未知错误',
        self::USER_LOGOFF => '账号已注销',
        self::LESS_THAN_MIN_PRICE => '价格错误, 请联系客服',

    ];
}